package com.jay.test.designModel.structure.decorator;

/**
 * Created by caoyuan7 on 2018/10/23.
 */

/**
 * 传来的实现类(装饰类)，然后调用装饰类的，它自己的方法
 */
public class Decorator implements Component{
    private Component component;

    public Decorator(Component component){
        this.component = component;
    }

    @Override
    public void sampleOperation() {
        // 委派给构件
        component.sampleOperation();
    }

}